package com.parktech.sun.domain.model.report;

import com.parktech.sun.domain.model.sunhz.Enterprise;
import com.parktech.sun.domain.model.sunhz.EnterpriseCategoryProduct;
import com.parktech.sun.domain.model.system.User;
import org.hibernate.annotations.Cascade;

import javax.persistence.*;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: guo
 * Date: 11-1-16
 * Time: 下午8:36
 * To change this template use File | Settings | File Templates.
 */
@Entity
public class KeyEconomyPropFinishStatus implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

/*    private String output;*/
    private String saleMoney;
    private String lastYearSaleMoney;
    private String saleMoneyAnnualBasisAmplification;
    private String profit;
    private String lastYearProfit;
    private String profitAnnualBasisAmplification;
    private String tax;
    private String lastYearTax;
    private String taxAnnualBasisAmplification;
    private String exportRate;
    private String lastYearExportRate;
    private String exportRateAnnualBasisAmplification;
    private String keyExportAmountRate;

    @OneToMany(mappedBy = "keyEconomyPropFinishStatus",cascade= CascadeType.ALL )
    @Cascade(org.hibernate.annotations.CascadeType.DELETE_ORPHAN)
    private List<KeyEconomyPropOutput> keyEconomyPropOutputList = new ArrayList<KeyEconomyPropOutput>();

    @Column(nullable = false)
    private String countYear;

    @Column(nullable = false)
    private String countQuarter;

    @ManyToOne
    @JoinColumn(name = "enterprise_id")
    private Enterprise enterprise;

  /*  @ManyToOne
    @JoinColumn(name = "enterprise_category_product_id")
    private EnterpriseCategoryProduct enterpriseCategoryProduct;*/

    @Column(nullable = false)
    private Date createDatetime = new Date();

    @Column(nullable = false)
    private Date updateDatetime = new Date();

    @ManyToOne
    @JoinColumn(name = "creator_id")
    private User creator;

    @ManyToOne
    @JoinColumn(name = "modifier_id")
    private User modifier;

    public List<KeyEconomyPropOutput> getKeyEconomyPropOutputList() {
        return keyEconomyPropOutputList;
    }

    public void setKeyEconomyPropOutputList(List<KeyEconomyPropOutput> keyEconomyPropOutputList) {
        this.keyEconomyPropOutputList = keyEconomyPropOutputList;
    }

    public void addKeyEconomyPropOutput(KeyEconomyPropOutput keyEconomyPropOutput)
    {
        keyEconomyPropOutput.setKeyEconomyPropFinishStatus(this);
        getKeyEconomyPropOutputList().add(keyEconomyPropOutput);
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

/*    public String getOutput() {
        return output;
    }

    public void setOutput(String output) {
        this.output = output;
    }*/

    public String getSaleMoney() {
        return saleMoney;
    }

    public void setSaleMoney(String saleMoney) {
        this.saleMoney = saleMoney;
    }

    public String getLastYearSaleMoney() {
        return lastYearSaleMoney;
    }

    public void setLastYearSaleMoney(String lastYearSaleMoney) {
        this.lastYearSaleMoney = lastYearSaleMoney;
    }

    public String getSaleMoneyAnnualBasisAmplification() {
        return saleMoneyAnnualBasisAmplification;
    }

    public void setSaleMoneyAnnualBasisAmplification(String saleMoneyAnnualBasisAmplification) {
        this.saleMoneyAnnualBasisAmplification = saleMoneyAnnualBasisAmplification;
    }

    public String getProfit() {
        return profit;
    }

    public void setProfit(String profit) {
        this.profit = profit;
    }

    public String getLastYearProfit() {
        return lastYearProfit;
    }

    public void setLastYearProfit(String lastYearProfit) {
        this.lastYearProfit = lastYearProfit;
    }

    public String getProfitAnnualBasisAmplification() {
        return profitAnnualBasisAmplification;
    }

    public void setProfitAnnualBasisAmplification(String profitAnnualBasisAmplification) {
        this.profitAnnualBasisAmplification = profitAnnualBasisAmplification;
    }

    public String getTax() {
        return tax;
    }

    public void setTax(String tax) {
        this.tax = tax;
    }

    public String getLastYearTax() {
        return lastYearTax;
    }

    public void setLastYearTax(String lastYearTax) {
        this.lastYearTax = lastYearTax;
    }

    public String getTaxAnnualBasisAmplification() {
        return taxAnnualBasisAmplification;
    }

    public void setTaxAnnualBasisAmplification(String taxAnnualBasisAmplification) {
        this.taxAnnualBasisAmplification = taxAnnualBasisAmplification;
    }

    public String getExportRate() {
        return exportRate;
    }

    public void setExportRate(String exportRate) {
        this.exportRate = exportRate;
    }

    public String getLastYearExportRate() {
        return lastYearExportRate;
    }

    public void setLastYearExportRate(String lastYearExportRate) {
        this.lastYearExportRate = lastYearExportRate;
    }

    public String getExportRateAnnualBasisAmplification() {
        return exportRateAnnualBasisAmplification;
    }

    public void setExportRateAnnualBasisAmplification(String exportRateAnnualBasisAmplification) {
        this.exportRateAnnualBasisAmplification = exportRateAnnualBasisAmplification;
    }

    public String getKeyExportAmountRate() {
        return keyExportAmountRate;
    }

    public void setKeyExportAmountRate(String keyExportAmountRate) {
        this.keyExportAmountRate = keyExportAmountRate;
    }

    public Date getCreateDatetime() {
        return createDatetime;
    }

    public void setCreateDatetime(Date createDatetime) {
        this.createDatetime = createDatetime;
    }

    public Date getUpdateDatetime() {
        return updateDatetime;
    }

    public void setUpdateDatetime(Date updateDatetime) {
        this.updateDatetime = updateDatetime;
    }

    public User getCreator() {
        return creator;
    }

    public void setCreator(User creator) {
        this.creator = creator;
    }

    public User getModifier() {
        return modifier;
    }

    public void setModifier(User modifier) {
        this.modifier = modifier;
    }

    public Enterprise getEnterprise() {
        return enterprise;
    }

    public void setEnterprise(Enterprise enterprise) {
        this.enterprise = enterprise;
    }

/*    public EnterpriseCategoryProduct getEnterpriseCategoryProduct() {
        return enterpriseCategoryProduct;
    }

    public void setEnterpriseCategoryProduct(EnterpriseCategoryProduct enterpriseCategoryProduct) {
        this.enterpriseCategoryProduct = enterpriseCategoryProduct;
    }*/

    public String getCountYear() {
        return countYear;
    }

    public void setCountYear(String countYear) {
        this.countYear = countYear;
    }

    public String getCountQuarter() {
        return countQuarter;
    }

    public void setCountQuarter(String countQuarter) {
        this.countQuarter = countQuarter;
    }
}